/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.sugon.webservice.entity;

import org.springframework.context.i18n.LocaleContextHolder;

import java.util.Locale;

/**
 * status enum
 */
public enum Status {

    /**
     *
     */

    SUCCESS(0, "success", "成功"),

    FAIL(1, "fail", "失败"),

    USER_FAIL(1, "Please initialize the child user first", "请先初始化子用户"),

    USER_WORKSPACE_FAIL(1, "Please initialize the workspace first", "子用户请先初始化工作空间"),

    NET_FAIL(1, "Check the login address and whether the network is normal!", "检查登陆地址,网络是否正常!"),

    INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"),

    REQUEST_PARAMS_NOT_VALID_ERROR(10001, "request parameter {0} is not valid", "请求参数[{0}]无效"),
    TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid", "任务超时参数无效"),
    USER_NAME_EXIST(10003, "user name already exists", "用户名已存在"),
    USER_NAME_NULL(10004, "user name is null", "用户名不能为空"),

    CREATE_WORKSPACE_ERROR(10084, "create workspace error", "创建工作空间错误"),
    QUERY_WORKSPACE_LIST_PAGING_ERROR(10085, "query workspace list paging error", "分页查询工作空间列表错误"),
    QUERY_WORKSPACE_LIST_ERROR(10086, "query workspace list error", "查询工作空间列表错误"),
    UPDATE_WORKSPACE_ERROR(10087, "update workspace error", "更新工作空间错误"),
    DELETE_WORKSPACE_BY_ID_ERROR(10088, "delete workspace by id error", "删除工作空间错误"),
    VERIFY_WORKSPACE_CODE_ERROR(10089, "verify workspace code error", "工作空间编码验证错误"),
    WORKSPACE_CODE_HAS_ALREADY_EXISTS(10089, "workspace code is already exit", "工作空间编码已存在"),
    QUERY_SYSTEM_RESOURCES_ERROR(10090, "query system resources error", "查询系统资源错误"),

    HDFS_OPERATION_ERROR(10006, "hdfs operation error", "hdfs操作错误"),
    TASK_INSTANCE_NOT_FOUND(10008, "task instance not found", "任务实例不存在"),
    USER_NOT_EXIST(10010, "user {0} not exists", "用户[{0}]不存在"),
    ALERT_GROUP_NOT_EXIST(10011, "alarm group not found", "告警组不存在"),
    ALERT_GROUP_EXIST(10012, "alarm group already exists", "告警组名称已存在"),
    USER_NAME_PASSWD_ERROR(10013, "user name or password error", "用户名或密码错误"),
    LOGIN_SESSION_FAILED(10014, "create session failed!", "创建session失败"),

    DATASOURCE_EXIST(10015, "data source name already exists", "数据源名称已存在"),
    DATASOURCE_CONNECT_FAILED(10016, "data source connection failed", "建立数据源连接失败"),
    PROJECT_NOT_FOUNT(10018, "project {0} not found ", "项目[{0}]不存在"),
    PROJECT_ALREADY_EXISTS(10019, "project {0} already exists", "项目名称[{0}]已存在"),

    QUERY_TASK_TYPE_ERROR(10020, "query task type error", "查询task type 错误"),
    TASK_INSTANCE_NOT_EXISTS(10020, "task instance {0} does not exist", "任务实例[{0}]不存在"),
    TASK_INSTANCE_NOT_SUB_WORKFLOW_INSTANCE(10021, "task instance {0} is not sub process instance", "任务实例[{0}]不是子流程实例"),
    SCHEDULE_CRON_NOT_EXISTS(10022, "scheduler crontab {0} does not exist", "调度配置定时表达式[{0}]不存在"),
    SCHEDULE_CRON_ONLINE_FORBID_UPDATE(10023, "online status does not allow update operations", "调度配置上线状态不允许修改"),
    SCHEDULE_CRON_CHECK_FAILED(10024, "scheduler crontab expression validation failure: {0}", "调度配置定时表达式验证失败: {0}"),
    MASTER_NOT_EXISTS(10025, "master does not exist", "无可用master节点"),
    SCHEDULE_STATUS_UNKNOWN(10026, "unknown status: {0}", "未知状态: {0}"),
    CREATE_ALERT_GROUP_ERROR(10027, "create alert group error", "创建告警组错误"),
    QUERY_ALL_ALERTGROUP_ERROR(10028, "query all alertgroup error", "查询告警组错误"),
    LIST_PAGING_ALERT_GROUP_ERROR(10029, "list paging alert group error", "分页查询告警组错误"),
    UPDATE_ALERT_GROUP_ERROR(10030, "update alert group error", "更新告警组错误"),
    DELETE_ALERT_GROUP_ERROR(10031, "delete alert group error", "删除告警组错误"),
    ALERT_GROUP_GRANT_USER_ERROR(10032, "alert group grant user error", "告警组授权用户错误"),
    CREATE_DATASOURCE_ERROR(10033, "create datasource error", "创建数据源错误"),
    UPDATE_DATASOURCE_ERROR(10034, "update datasource error", "更新数据源错误"),
    QUERY_DATASOURCE_ERROR(10035, "query datasource error", "查询数据源错误"),
    CONNECT_DATASOURCE_FAILURE(10036, "connect datasource failure", "建立数据源连接失败"),
    CONNECTION_TEST_FAILURE(10037, "connection test failure", "测试数据源连接失败"),
    DELETE_DATA_SOURCE_FAILURE(10038, "delete data source failure", "删除数据源失败"),
    VERIFY_DATASOURCE_NAME_FAILURE(10039, "verify datasource name failure", "验证数据源名称失败"),
    UNAUTHORIZED_DATASOURCE(10040, "unauthorized datasource", "未经授权的数据源"),
    AUTHORIZED_DATA_SOURCE(10041, "authorized data source", "授权数据源失败"),
    LOGIN_SUCCESS(10042, "login success", "登录成功"),
    USER_LOGIN_FAILURE(10043, "user login failure", "用户登录失败"),
    LIST_WORKERS_ERROR(10044, "list workers error", "查询worker列表错误"),
    LIST_MASTERS_ERROR(10045, "list masters error", "查询master列表错误"),
    UPDATE_PROJECT_ERROR(10046, "update project error", "更新项目信息错误"),
    QUERY_PROJECT_DETAILS_BY_ID_ERROR(10047, "query project details by id error", "查询项目详细信息错误"),
    CREATE_PROJECT_ERROR(10048, "create project error", "创建项目错误"),
    LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR(10049, "login user query project list paging error", "分页查询项目列表错误"),
    DELETE_PROJECT_ERROR(10050, "delete project error", "删除项目错误"),
    QUERY_UNAUTHORIZED_PROJECT_ERROR(10051, "query unauthorized project error", "查询未授权项目错误"),
    QUERY_AUTHORIZED_PROJECT(10052, "query authorized project", "查询授权项目错误"),
    QUERY_QUEUE_LIST_ERROR(10053, "query queue list error", "查询队列列表错误"),
    CREATE_RESOURCE_ERROR(10054, "create resource error", "创建资源错误"),
    UPDATE_RESOURCE_ERROR(10055, "update resource error", "更新资源错误"),
    QUERY_RESOURCES_LIST_ERROR(10056, "query resources list error", "查询资源列表错误"),
    QUERY_RESOURCES_LIST_PAGING(10057, "query resources list paging", "分页查询资源列表错误"),
    DELETE_RESOURCE_ERROR(10058, "delete resource error", "删除资源错误"),
    VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR(10059, "verify resource by name and type error", "资源名称或类型验证错误"),
    VIEW_RESOURCE_FILE_ON_LINE_ERROR(10060, "view resource file online error", "查看资源文件错误"),
    CREATE_RESOURCE_FILE_ON_LINE_ERROR(10061, "create resource file online error", "创建资源文件错误"),
    RESOURCE_FILE_IS_EMPTY(10062, "resource file is empty", "资源文件内容不能为空"),
    EDIT_RESOURCE_FILE_ON_LINE_ERROR(10063, "edit resource file online error", "更新资源文件错误"),
    DOWNLOAD_RESOURCE_FILE_ERROR(10064, "download resource file error", "下载资源文件错误"),
    CREATE_UDF_FUNCTION_ERROR(10065, "create udf function error", "创建UDF函数错误"),
    VIEW_UDF_FUNCTION_ERROR(10066, "view udf function error", "查询UDF函数错误"),
    UPDATE_UDF_FUNCTION_ERROR(10067, "update udf function error", "更新UDF函数错误"),
    QUERY_UDF_FUNCTION_LIST_PAGING_ERROR(10068, "query udf function list paging error", "分页查询UDF函数列表错误"),
    QUERY_DATASOURCE_BY_TYPE_ERROR(10069, "query datasource by type error", "查询数据源信息错误"),
    VERIFY_UDF_FUNCTION_NAME_ERROR(10070, "verify udf function name error", "UDF函数名称验证错误"),
    DELETE_UDF_FUNCTION_ERROR(10071, "delete udf function error", "删除UDF函数错误"),
    AUTHORIZED_FILE_RESOURCE_ERROR(10072, "authorized file resource error", "授权资源文件错误"),
    AUTHORIZE_RESOURCE_TREE(10073, "authorize resource tree display error", "授权资源目录树错误"),
    UNAUTHORIZED_UDF_FUNCTION_ERROR(10074, "unauthorized udf function error", "查询未授权UDF函数错误"),
    AUTHORIZED_UDF_FUNCTION_ERROR(10075, "authorized udf function error", "授权UDF函数错误"),
    CREATE_SCHEDULE_ERROR(10076, "create schedule error", "创建调度配置错误"),
    UPDATE_SCHEDULE_ERROR(10077, "update schedule error", "更新调度配置错误"),
    PUBLISH_SCHEDULE_ONLINE_ERROR(10078, "publish schedule online error", "上线调度配置错误"),
    OFFLINE_SCHEDULE_ERROR(10079, "offline schedule error", "下线调度配置错误"),
    QUERY_SCHEDULE_LIST_PAGING_ERROR(10080, "query schedule list paging error", "分页查询调度配置列表错误"),
    QUERY_SCHEDULE_LIST_ERROR(10081, "query schedule list error", "查询调度配置列表错误"),
    QUERY_TASK_LIST_PAGING_ERROR(10082, "query task list paging error", "分页查询任务列表错误"),
    QUERY_TASK_RECORD_LIST_PAGING_ERROR(10083, "query task record list paging error", "分页查询任务记录错误"),
    QUERY_SCHEDULE_ERROR(10084, "query schedule error", "查询调度配置错误"),

    CREATE_USER_ERROR(10090, "create user error", "创建用户错误"),
    QUERY_USER_LIST_PAGING_ERROR(10091, "query user list paging error", "分页查询用户列表错误"),
    UPDATE_USER_ERROR(10092, "update user error", "更新用户错误"),
    DELETE_USER_BY_ID_ERROR(10093, "delete user by id error", "删除用户错误"),
    GRANT_PROJECT_ERROR(10094, "grant project error", "授权项目错误"),
    GRANT_RESOURCE_ERROR(10095, "grant resource error", "授权资源错误"),
    GRANT_UDF_FUNCTION_ERROR(10096, "grant udf function error", "授权UDF函数错误"),
    GRANT_DATASOURCE_ERROR(10097, "grant datasource error", "授权数据源错误"),
    GET_USER_INFO_ERROR(10098, "get user info error", "获取用户信息错误"),
    USER_LIST_ERROR(10099, "user list error", "查询用户列表错误"),
    VERIFY_USERNAME_ERROR(10100, "verify username error", "用户名验证错误"),
    UNAUTHORIZED_USER_ERROR(10101, "unauthorized user error", "查询未授权用户错误"),
    AUTHORIZED_USER_ERROR(10102, "authorized user error", "查询授权用户错误"),
    QUERY_TASK_INSTANCE_LOG_ERROR(10103, "view task instance log error", "查询任务实例日志错误"),
    DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR(10104, "download task instance log file error", "下载任务日志文件错误"),
    CREATE_PROCESS_DEFINITION(10105, "create process definition", "创建工作流错误"),
    VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR(10106, "verify process definition name unique error", "工作流定义名称已存在"),
    UPDATE_PROCESS_DEFINITION_ERROR(10107, "update process definition error", "更新工作流定义错误"),
    RELEASE_PROCESS_DEFINITION_ERROR(10108, "release process definition error", "上线工作流错误"),
    QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR(10109, "query datail of process definition error", "查询工作流详细信息错误"),
    QUERY_PROCESS_DEFINITION_LIST(10110, "query process definition list", "查询工作流列表错误"),
    ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR(10111, "encapsulation treeview structure error", "查询工作流树形图数据错误"),
    GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR(10112, "get tasks list by process definition id error", "查询工作流定义节点信息错误"),
    QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR(10113, "query process instance list paging error", "分页查询工作流实例列表错误"),
    QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR(10114, "query task list by process instance id error", "查询任务实例列表错误"),
    UPDATE_PROCESS_INSTANCE_ERROR(10115, "update process instance error", "更新工作流实例错误"),
    QUERY_PROCESS_INSTANCE_BY_ID_ERROR(10116, "query process instance by id error", "查询工作流实例错误"),
    DELETE_PROCESS_INSTANCE_BY_ID_ERROR(10117, "delete process instance by id error", "删除工作流实例错误"),
    QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR(10118, "query sub process instance detail info by task id error", "查询子流程任务实例错误"),
    QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR(10119, "query parent process instance detail info by sub process instance id error", "查询子流程该工作流实例错误"),
    QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR(10120, "query process instance all variables error", "查询工作流自定义变量信息错误"),
    ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR(10121, "encapsulation process instance gantt structure error", "查询工作流实例甘特图数据错误"),
    QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR(10122, "query process definition list paging error", "分页查询工作流定义列表错误"),

    SIGN_OUT_ERROR(10123, "sign out error", "退出错误"),
    TENANT_CODE_HAS_ALREADY_EXISTS(10124, "tenant code has already exists", "租户编码已存在"),
    IP_IS_EMPTY(10125, "ip is empty", "IP地址不能为空"),
    SCHEDULE_CRON_REALEASE_NEED_NOT_CHANGE(10126, "schedule release is already {0}", "调度配置上线错误[{0}]"),
    CREATE_QUEUE_ERROR(10127, "create queue error", "创建队列错误"),
    QUEUE_NOT_EXIST(10128, "queue {0} not exists", "队列ID[{0}]不存在"),
    QUEUE_VALUE_EXIST(10129, "queue value {0} already exists", "队列值[{0}]已存在"),
    QUEUE_NAME_EXIST(10130, "queue name {0} already exists", "队列名称[{0}]已存在"),
    UPDATE_QUEUE_ERROR(10131, "update queue error", "更新队列信息错误"),
    NEED_NOT_UPDATE_QUEUE(10132, "no content changes, no updates are required", "数据未变更，不需要更新队列信息"),
    VERIFY_QUEUE_ERROR(10133, "verify queue error", "验证队列信息错误"),
    NAME_NULL(10134, "name must be not null", "名称不能为空"),
    NAME_EXIST(10135, "name {0} already exists", "名称[{0}]已存在"),
    SAVE_ERROR(10136, "save error", "保存错误"),
    DELETE_PROJECT_ERROR_DEFINES_NOT_NULL(10137, "please delete the process definitions in project first!", "请先删除全部工作流定义"),
    BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR(10117, "batch delete process instance by ids {0} error", "批量删除工作流实例错误"),
    PREVIEW_SCHEDULE_ERROR(10139, "preview schedule error", "预览调度配置错误"),
    PARSE_TO_CRON_EXPRESSION_ERROR(10140, "parse cron to cron expression error", "解析调度表达式错误"),
    SCHEDULE_START_TIME_END_TIME_SAME(10141, "The start time must not be the same as the end", "开始时间不能和结束时间一样"),
    DELETE_TENANT_BY_ID_FAIL(10142, "delete tenant by id fail, for there are {0} process instances in executing using it", "删除租户失败，有[{0}]个运行中的工作流实例正在使用"),
    DELETE_TENANT_BY_ID_FAIL_DEFINES(10143, "delete tenant by id fail, for there are {0} process definitions using it", "删除租户失败，有[{0}]个工作流定义正在使用"),
    DELETE_TENANT_BY_ID_FAIL_USERS(10144, "delete tenant by id fail, for there are {0} users using it", "删除租户失败，有[{0}]个用户正在使用"),
    DELETE_WORKER_GROUP_BY_ID_FAIL(10145, "delete worker group by id fail, for there are {0} process instances in executing using it", "删除Worker分组失败，有[{0}]个运行中的工作流实例正在使用"),
    QUERY_WORKER_GROUP_FAIL(10146, "query worker group fail ", "查询worker分组失败"),
    DELETE_WORKER_GROUP_FAIL(10147, "delete worker group fail ", "删除worker分组失败"),
    COPY_PROCESS_DEFINITION_ERROR(10148, "copy process definition error", "复制工作流错误"),
    QUERY_TABLE_ROW_COUNT_FAIL(10149, "query table row count fail", "查询表记录数失败"),
    CREATE_BATCH_PROCESS_DEFINITION(10150, "create batch process definition", "批量创建工作流错误"),

    RESOURCE_IS_AUTHORIZED(20017, "resource is authorized to user {0},suffix not allowed to be modified", "资源文件已授权其他用户[{0}],后缀不允许修改"),


    QUERY_TABLE_CATALOG(10148, "query table catalog", "查询目录内工作表列表错误"),
    QUERY_TABLE_INFO_FAIL(10149, "query table info", "查询表视图信息错误"),
    QUERY_TABLE_INFO_BY_DBID(10149, "query table info by tbId", "查询hiveId查询表信息错误"),
    QUERY_TABLE_LIST_PAGING(10150, "query table list paging", "查询资源目录-工作表列表错误"),
    DELETETABLE_CATALOG_ERROR(10151, "delete table catalog error", "删除目录错误"),
    CREAYETABLE_CATALOG(10152, "create table catalog", "新建目录错误"),
    CREATE_TABLE_ERROR(10153, "create table info", "建表信息错误"),
    UPDATE_TABLE_ERROR(10154, "update table info", "更新表信息错误"),
    DELETE_TABLE_ERROR(10155, "delete table info", "删除表信息错误"),
    UPDATETABLE_CATALOG_ERROR(10156, "update table catalog error", "编辑目录错误"),
    CREATE_TABLE_BY_DDL(10157, "create table by ddl", "DDL建表解析失败，请检查sql语句"),
    UPDATE_PROCESS_SCHEDULER_DATA(10158, "update process scheduler data", "更新流程周期参数传入有误"),
    QUERY_TABLE_INFO_IS_EXIST(10159, "query table info is exist", "查询表视图信息是否存在错误"),
    QUERY_TABLE_ERROR(10155, "query table info", "业务库表信息不存在"),
    LOGIN_USER_QUERY_PROJECT_LIST_ERROR(10161, "login user query project list error", "查询项目列表错误"),
    LOGIN_USER_QUERY_PROJECT_DROP_LIST_ERROR(10062, "login user query project drop list error", "查询项目下拉列表错误"),
    BATCH_ADD_TAGS_FOR_PROCESS_INSTANCE_ERROR(10063, "batch add tags for process instance error", "流程实例批量添加书签错误"),
    QUERY_TAGS_FOR_PROCESS_INSTANCE_ERROR(10064, "query tags for process instance error", "流程实例查询书签错误"),
    BATCH_ADD_TAGS_FOR_TASK_INSTANCE_ERROR(10065, "batch add tags for task instance error", "任务实例批量添加书签错误"),
    QUERY_TAGS_FOR_TASK_INSTANCE_ERROR(10066, "query tags for task instance error", "任务实例查询书签错误"),
    INSTANCE_TYPE_AND_DEFTYPE_IS_EXISTED(10067, "instance type and deftype is existed", "实例类型和流程类型已存在"),
    QUERY_SCHEDULE_CLEAN_OPERATION_TASK_FAIL(10068, "query schedule clean operation task fail", "定期清理运维中心任务查询失败"),
    ADD_SCHEDULE_CLEAN_OPERATION_TASK_FAIL(10069, "add schedule clean operation task fail", "定期清理运维中心任务新建失败"),
    DELETE_SCHEDULE_CLEAN_OPERATION_TASK_FAIL(10070, "delete schedule clean operation task fail", "定期清理运维中心任务删除失败"),
    UPDATE_SCHEDULE_CLEAN_OPERATION_TASK_FAIL(10071, "update schedule clean operation task fail", "定期清理运维中心任务编辑失败"),
    REPLACE_PROJECT_FAIL(10072, "replace project fail", "更换项目失败"),
    TABLE_AND_TYPE(19073, "TABLE AND TYPE CAN NOT BE NULL", "字典表名称与类型不可为空"),

    CREATE_TABLE_SUCCESS(0, "create table success", "建表成功"),
    UPDATE_TABLE_SUCCESS(0, "update table success", "更新表成功"),
    DELETE_TABLE_SUCCESS(0, "delete table success", "删除表成功"),
    CREATE_TABLE_BY_DDL_SUCCESS(0, "create table by ddl success", "DDL建表解析成功"),
    CREATE_CATALOG_SUCCESS(0, "create  catalog success", "目录新建成功"),
    DELETE_CATALOG_SUCCESS(0, "delete  catalog success", "目录删除成功"),
    UPDATE_CATALOG_SUCCESS(0, "update  catalog success", "目录保存成功"),
    QUERY_DATA_SUCCESS(0, "query  data success", "数据仓库中无此表"),
    QUERY_COLUMN_FAILURE(20015, "query column failuer", "查询列失败"),


    UDF_FUNCTION_NOT_EXIST(20001, "UDF function not found", "UDF函数不存在"),
    UDF_FUNCTION_EXISTS(20002, "UDF function already exists", "UDF函数已存在"),
    RESOURCE_NOT_EXIST(20004, "resource not exist", "资源不存在"),
    RESOURCE_EXIST(20005, "resource already exists", "资源已存在"),
    RESOURCE_SUFFIX_NOT_SUPPORT_VIEW(20006, "resource suffix do not support online viewing", "资源文件后缀不支持查看"),
    RESOURCE_SIZE_EXCEED_LIMIT(20007, "upload resource file size exceeds limit", "上传资源文件大小超过限制"),
    RESOURCE_SUFFIX_FORBID_CHANGE(20008, "resource suffix not allowed to be modified", "资源文件后缀不支持修改"),
    UDF_RESOURCE_SUFFIX_NOT_JAR(20009, "UDF resource suffix name must be jar", "UDF资源文件后缀名只支持[jar]"),
    HDFS_COPY_FAIL(20010, "hdfs copy {0} -> {1} fail", "hdfs复制失败：[{0}] -> [{1}]"),
    RESOURCE_FILE_EXIST(20011, "resource file {0} already exists in hdfs,please delete it or change name!", "资源文件[{0}]在hdfs中已存在，请删除或修改资源名"),
    RESOURCE_FILE_NOT_EXIST(20012, "resource file {0} not exists in hdfs!", "资源文件[{0}]在hdfs中不存在"),
    UDF_RESOURCE_IS_BOUND(20013, "udf resource file is bound by UDF functions:{0}", "udf函数绑定了资源文件[{0}]"),
    RESOURCE_IS_USED(20014, "resource file is used by process definition", "资源文件被上线的流程定义使用了"),
    PARENT_RESOURCE_NOT_EXIST(20015, "parent resource not exist", "父资源文件不存在"),
    RESOURCE_NOT_EXIST_OR_NO_PERMISSION(20016, "resource not exist or no permission,please view the task node and remove error resource", "请检查任务节点并移除无权限或者已删除的资源"),
    RESOURCE_COPY_FAIL(20017, "resource copy fail", "资源复制失败"),

    USER_NO_OPERATION_PERM(30001, "user has no operation privilege", "当前用户没有操作权限"),
    USER_NO_OPERATION_PROJECT_PERM(30002, "user {0} is not has project {1} permission", "当前用户[{0}]没有[{1}]项目的操作权限"),


    PROCESS_INSTANCE_NOT_EXIST(50001, "process instance {0} does not exist", "工作流实例[{0}]不存在"),
    PROCESS_INSTANCE_EXIST(50002, "process instance {0} already exists", "工作流实例[{0}]已存在"),
    PROCESS_DEFINE_NOT_EXIST(50003, "process definition {0} does not exist", "工作流定义[{0}]不存在"),
    PROCESS_DEFINE_NOT_RELEASE(50004, "process definition {0} not on line", "工作流定义[{0}]不是上线状态"),
    PROCESS_INSTANCE_ALREADY_CHANGED(50005, "the status of process instance {0} is already {1}", "工作流实例[{0}]的状态已经是[{1}]"),
    PROCESS_INSTANCE_STATE_OPERATION_ERROR(50006, "the status of process instance {0} is {1},Cannot perform {2} operation", "工作流实例[{0}]的状态是[{1}]，无法执行[{2}]操作"),
    SUB_PROCESS_INSTANCE_NOT_EXIST(50007, "the task belong to process instance does not exist", "子工作流实例不存在"),
    PROCESS_DEFINE_NOT_ALLOWED_EDIT(50008, "process definition {0} does not allow edit", "工作流定义[{0}]不允许修改"),
    PROCESS_INSTANCE_EXECUTING_COMMAND(50009, "process instance {0} is executing the command, please wait ...", "工作流实例[{0}]正在执行命令，请稍等..."),
    PROCESS_INSTANCE_NOT_SUB_PROCESS_INSTANCE(50010, "process instance {0} is not sub process instance", "工作流实例[{0}]不是子工作流实例"),
    TASK_INSTANCE_STATE_COUNT_ERROR(50011, "task instance state count error", "查询各状态任务实例数错误"),
    COUNT_PROCESS_INSTANCE_STATE_ERROR(50012, "count process instance state error", "查询各状态流程实例数错误"),
    COUNT_PROCESS_DEFINITION_USER_ERROR(50013, "count process definition user error", "查询各用户流程定义数错误"),
    START_PROCESS_INSTANCE_ERROR(50014, "start process instance error", "运行工作流实例错误"),
    EXECUTE_PROCESS_INSTANCE_ERROR(50015, "execute process instance error", "操作工作流实例错误"),
    CHECK_PROCESS_DEFINITION_ERROR(50016, "check process definition error", "检查工作流实例错误"),
    QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR(50017, "query recipients and copyers by process definition error", "查询收件人和抄送人错误"),
    DATA_IS_NOT_VALID(50017, "data {0} not valid", "数据[{0}]无效"),
    DATA_IS_NULL(50018, "data {0} is null", "数据[{0}]不能为空"),
    PROCESS_NODE_HAS_CYCLE(50019, "process node has cycle", "流程节点间存在循环依赖"),
    PROCESS_NODE_S_PARAMETER_INVALID(50020, "process node {0} parameter invalid", "流程节点[{0}]参数无效"),
    PROCESS_DEFINE_STATE_ONLINE(50021, "process definition {0} is already on line", "工作流定义[{0}]已上线"),
    DELETE_PROCESS_DEFINE_BY_ID_ERROR(50022, "delete process definition by id error", "删除工作流定义错误"),
    SCHEDULE_CRON_STATE_ONLINE(50023, "the status of schedule {0} is already on line", "调度配置[{0}]已上线"),
    DELETE_SCHEDULE_CRON_BY_ID_ERROR(50024, "delete schedule by id error", "删除调度配置错误"),
    BATCH_DELETE_PROCESS_DEFINE_ERROR(50025, "batch delete process definition error", "批量删除工作流定义错误"),
    BATCH_DELETE_PROCESS_DEFINE_BY_IDS_ERROR(50026, "batch delete process definition by ids {0} error", "批量删除工作流定义[{0}]错误"),
    TENANT_NOT_SUITABLE(50027, "there is not any tenant suitable, please choose a tenant available.", "没有合适的租户，请选择可用的租户"),
    EXPORT_PROCESS_DEFINE_BY_ID_ERROR(50028, "export process definition by id error", "导出工作流定义错误"),
    BATCH_EXPORT_PROCESS_DEFINE_BY_IDS_ERROR(50028, "batch export process definition by ids error", "批量导出工作流定义错误"),
    IMPORT_PROCESS_DEFINE_ERROR(50029, "import process definition error", "导入工作流定义错误"),
    PROCESS_DEFINITION_NOT_EXIST(50030, "process definition dont exist", "流程定义不存在"),
    QUALITY_JOB_SUMMARY_DELETE_ERROR(50031, "delete quality job summary error", "删除质量作业失败"),
    HDFS_NOT_STARTUP(60001, "hdfs not startup", "hdfs未启用"),

    /**
     * for monitor
     */
    QUERY_DATABASE_STATE_ERROR(70001, "query database state error", "查询数据库状态错误"),
    QUERY_ZOOKEEPER_STATE_ERROR(70002, "query zookeeper state error", "查询zookeeper状态错误"),


    CREATE_ACCESS_TOKEN_ERROR(70010, "create access token error", "创建访问token错误"),
    GENERATE_TOKEN_ERROR(70011, "generate token error", "生成token错误"),
    QUERY_ACCESSTOKEN_LIST_PAGING_ERROR(70012, "query access token list paging error", "分页查询访问token列表错误"),
    UPDATE_ACCESS_TOKEN_ERROR(70013, "update access token error", "更新访问token错误"),
    DELETE_ACCESS_TOKEN_ERROR(70014, "delete access token error", "删除访问token错误"),
    ACCESS_TOKEN_NOT_EXIST(70015, "access token not exist", "访问token不存在"),


    COMMAND_STATE_COUNT_ERROR(80001, "task instance state count error", "查询各状态任务实例数错误"),

    QUEUE_COUNT_ERROR(90001, "queue count error", "查询队列数据错误"),

    KERBEROS_STARTUP_STATE(100001, "get kerberos startup state error", "获取kerberos启动状态错误"),



    /* <p>-----------------------------------------    以下为轩辕添加     -------------------------------------------     </p>*/

    // DataProvider 错误
    QUERY_ALL_TABLE_ERROR(100201, "query all table error", "查询数据源下所有表错误"),
    QUERY_COLUMN_DETAIL_BY_TABLE_ERROR(100202, "query columns detail by table error", "根据选择表名查询映射字段错误"),
    QUERY_COLUMN_DETAIL_BY_INPUT_ERROR(100203, "query columns detail by input error", "根据输入表名查询映射字段错误"),
    QUERY_COLUMN_DETAIL_BY_SQL_ERROR(100204, "query columns detail by sql error", "根据SQL查询映射字段错误"),
    QUERY_MAX_DATA_BY_DATASOURCE_ERROR(100205, "query max data by datasource error", "根据数据源查询数据最大值错误"),
    QUERY_SAMPLING_TABLE_ERROR(100206, "query sampling table error", "查询表记录错误"),
    SAMPLING_TABLE_NAME_EMPTY_ERROR(100207, "sampling table name empty error", "采样表名称不能为空"),
    QUERY_COLUMN_DETAIL_EMPTY_ERROR(100208, "query columns detail empty error", "查询映射失败，空表无法读取映射"),

    QUERY_DATA_EXPLORE_TASK_LIST_PAGING_ERROR(110001, " query_data_explore_task_list_paging_error", "分页查询数据探查_任务列表错误"),

    QUERY_DATA_EXPLORE_RESULT_LIST_PAGING_ERROR(110002, " query_data_explore_result_list_paging_error", "分页查询数据探查_结果列表错误"),

    QUERY_DATA_EXPLORE_RESULT_BY_ID_ERROR(110003, " query_data_explore_result_by_id_error", "根据id查询数据探查_结果信息错误"),
    QUERY_DATAEXPLORE_RESULT_BY_TABLENAME_ERROR(110003, " query dataExplore result by tableName error", "根据表名查询数据探查结果信息错误"),
    QUERY_DATAEXPLORE_RESULT_BY_SAMPLETABLENAME_ERROR(110003, " query dataExplore result by sampleTableName error", "根据采样表名查询数据探查结果信息错误"),
    DELETE_DATAEXPLORE_RESULT_BY_SAMPLETABLENAME_ERROR(110006, " delete dataExplore result by sampleTableName error", "数据探查记录删除错误"),
    DATAEXPLORE_TABLE_INFO_NOT_FOUNT(10018, "dataExplore table {0} not found ", "数据探查结果表[{0}]不存在"),
    EXECUTE_DATA_EXPLORE_ERROR(10019, "execute data explore task error ", "执行数据探查失败"),
    GET_DATA_EXPLORE_TASK_STATUS_ERROR(10020, "get data explore task status error ", "获取数据探查任务状态失败"),
    TABLE_ALREADY_EXISTS_ERROR(10021, "table {0} already exists ", "表[{0}]已存在"),
    PARSE_ERROR(10022, "parse error.", "解析失败，请检查json格式是否正确。"),
    /**
     * 轩辕系统_集群资源_权限配置
     */
    CLUSTER_AUTHORITY_MYSELF(120000, "workspace can not grant myself", "用户不能将空间权限授予自己"),
    CLUSTER_AUTHORITY_EXIST(120001, "workspace already granted", "空间权限已经授权"),
    CLUSTER_AUTHORITY_NOT_BELONG(120002, "not the owner of the workspace", "非空间创建用户"),
    CLUSTER_AUTHORITY_NOT_EXIST(120003, "workspace not be granted", "空间未被授权"),

    CLUSTER_CONFIG_USED(121000, "workspace already granted,first should be revoke ", "请先撤销授权表空间"),

    OS_USER_NAME_EXIST(121001, "os user name already exists", "云平台账号已存在"),


    /**
     * 临时查询
     **/
    TEMPORARY_QUERY_CATALOG_NOT_EXIST(130000, "temporary query catalog not exist", "临时查询分类不存在"),
    TEMPORARY_QUERY_CATALOG_NAME_EMPTY(130001, "temporary query catalog name empty", "临时查询分类名称不能为空"),
    TEMPORARY_QUERY_NOT_EXIST(130002, "temporary query not exist", "临时查询不存在"),
    EXECUTE_TEMPORARY_QUERY_ERROR(130003, "temporary query error", "执行临时查询出错"),
    QUERY_SCHEMA_DATABASE_EMPTY(130004, "query schema database empty", "查询参数 database 不能为空"),
    QUERY_SCHEMA_TABLE_EMPTY(130005, "query schema table empty", "查询参数 table 不能为空"),
    TEMPORARY_QUERY_RESULT_EMPTY(130006, "temporary query result empty", "未获取到临时查询结果集"),
    CREATE_TEMPORARY_QUERY_TASK_INSTANCES_ERROR(130007, "create temporary query task instances error", "创建临时查询任务实列失败"),
    ADD_TEMPORARY_QUERY_TASK_TO_QUEUE_ERROR(130008, "add temporary query task instances to queue error", "临时查询任务加入队列失败"),
    TEMPORARY_QUERY_TYPE_NOT_EXIST(130009, "temporary query type not exist", "临时查询类型不存在"),
    TASK_INSTANCE_HOST_NAME_EMPTY(130010, "task instance hostname empty", "任务实例 hostname 为空，等待worker执行 "),
    DEL_TEMPORARY_QUERY_CATALOG_HAVE_CHILD(130011, "del temporary query catalog _have child", "当前目录下存在子目录或查询信息，不允许删除！"),
    TEMPORARY_QUERY_IS_EXIST(130012, "temporary query is exist", "当前目录下存在同名查询节点，同一目录下查询名称不允许重复"),
    TEMPORARY_QUERY_CATALOG_IS_EXIST(130013, "temporary query catalog is exist", "临时查询分类已存在，同一节点分类名称不容许重复"),
    TEMPORARY_QUERY_TASK_INSTANCES_NOT_EXIST(130014, "temporary query task instances not exist", "临时查询任务实列不存在"),
    SQL_PAD_CATALOG_NOT_EMPTY(130015, "sql pad catalog not empty", "该目录下存在子目录或者历史临时查询，不允许删除"),
    SQL_PAD_GET_DATASOURCE_SCHEMA_FAIL(130016, "sql pad get datasource schema fail", "获取数据源链接信息失败"),
    SQL_PAD_GET_DATASOURCE_CONNECTION_FAIL(130017, "sql pad get datasource connection fail", "获取数据源连接失败"),
    UPDATE_TEMP_QUERY_HISTORY_CATALOG_FAIL(130018, "update temp query histroy fail", "更改临时查询目录失败"),

    /****
     * 文本离线任务
     * */
    QUERY_RESOURCES_COLUMNS_DETAIL_ERROR(140000, "query resources columns detail error", "读取资源文件映射失败"),
    TXT_FILE_MUST_HAVE_SEPARATOR(140001, "txt file must have separator", "文本类型文件必须有分隔符"),
    RESOURCE_FILE_TYPE_NOT_SUPPORT(140002, "resources file type not support", "资源文本类型不支持"),
    GET_FILE_COLUMNS_ERROR(140003, "get file columns error", "获取文件字段列表失败"),
    TARGET_DATA_SOURCES_NOT_EXIST(140004, "target data sources not exist", "目标源不存在"),
    TARGET_DB_TYPE_ONLY_SUPPORT_HIVE(140005, "target data sources not exist", "目标源类型只能是Hive"),
    GET_CLUSTER_CONFIG_FAIL(140006, "target data sources not exist", "获取集群配置信息失败"),
    ILLEGAL_VALUE(140007, "illegal value", "不支持的编码格式"),
    SUPPORT_FILE_TYPE(140008, "support file type", "数据导入目前支持  文本类 TEXT, CSV, LOG 和  EXCEL"),
    SUPPORT_DELIMITERINSTR(140009, "support delimiterinstr", "仅仅支持单字符切分"),
    CONFIG_COLUMN(140010, "please config column", "请配置字段信息"),
    GET_DATASOURCE_CONFIG_FAIL(140011, "target data sources not exist", "获取集群配置信息失败"),
    GET_RECOMMEND_DATA_TYPE_ERROR(140012, "get recommend data type error ", "获取推荐字段类型错误"),
    GET_TASK_INCREMENT_VALUE_ERROR(140013, "get task increment value error ", "获取任务切点值失败"),
    NO_TASK_INCREMENT_VALUE_ERROR(140014, "no task increment value error ", "任务增量值不存在"),
    UPDATE_TASK_INCREMENT_VALUE_ERROR(140015, "no task increment value error ", "修改增量值失败"),
    DELETE_TASK_INCREMENT_VALUE_ERROR(140015, "no task increment value error ", "删除增量值失败"),

    TRANSFER_FAIL(150001, "transfer fail", "datahubjob 转换失败"),

    /**
     * 数据预览
     **/
    DATA_PREVIEW_TABLE_NOT_FOUND(160001, "table not found", "表不存在"),
    DATA_PREVIEW_SCHEMA_NOT_FOUND(160002, "schema not found", "未匹配到数据源"),


    /**
     * 流程管理
     */
    PROCESS_MANAGE_NOT_EXIST(170001, "process manage not found", "流程管理不存在"),
    CREATE_PROCESS_MANAGE_ERROR(170002, "create process manage error", "创建流程管理错误"),
    DELETE_PROCESS_MANAGE_ERROR(170003, "delete process manage error", "删除流程管理错误"),
    LOGIN_USER_QUERY_PROCESS_MANAGE_LIST_PAGING_ERROR(17004, "login user query process manage list paging error", "分页查询流程列表错误"),
    UPDATE_PROCESS_MANAGE_ERROR(170005, "update process manage error", "更新流程管理错误"),
    UDF_PROCESS_IN_USE(20017, "udf process function in use", "流程管理在使用，不能被删除"),
    QUERY_PROCESS_MANAGE_ERROR(170003, "query process manage error", "查询流程管理错误"),
    UDF_COMBINE_ERROR(170003, "udf combine error", "udf函数[{0}]不能组合"),


    /**
     * 字段流程映射
     */
    UDF_TEMPLATE_NOT_EXIST(180001, "udf template not found", "字段流程映射不存在"),
    CREATE_UDF_TEMPLATE_ERROR(180002, "create process manage error", "创建字段流程映射错误"),
    DELETE_UDF_TEMPLATE_ERROR(180003, "delete process manage error", "删除字段流程映射错误"),
    LOGIN_USER_QUERY_UDF_TEMPLATE_LIST_PAGING_ERROR(18004, "login user query process manage list paging error", "分页查询字段流程映射列表错误"),
    UPDATE_UDF_TEMPLATE_ERROR(180005, "update process manage error", "更新字段流程映射错误"),
    QUERY_UDF_TEMPLATE_DETAILS_BY_ID_ERROR(10047, "query udf template details by id error", "查询字段流程映射详细信息错误"),
    UDF_TEMPLATE_NOT_FOUNT(10018, "udf template {0} not found ", "字段流程映射[{0}]不存在"),
    UDF_TEMPLATE_HAS_EXISTED(10019, "udf template has existed ", "策略组名称重复"),


    UPDATE_LINEAGE_STATE_ERROR(190001, "update lineage  process definition  state error", "更新血缘流程状态"),
    LINEAGE_SUMMARY_NOT_EXIST(190002, " lineage summary  not found", "血缘映射未找到"),
    QUALITY_JOB_SUMMARY_NOT_EXIST(190002, "quality job summary not found", "质量作业未找到"),
    TAG_JOB_SUMMARY_NOT_EXIST(190002, "tag job summary not found", "标签作业未找到"),
    LINEAGE_PROCESS_DEFINITION_NOT_EXIST(190003, " lineage process definition  not found", "血缘映射流程关系未找到"),
    LINEAGE_SUMMARY_ALREADY_OFFLINE(190004, " lineage summary already offline", "血缘映射流程已经下线"),
    TAG_SUMMARY_ALREADY_OFFLINE(190004, " tag summary already offline", "标签映射流程已经下线"),
    QUALITY_JOB_SUMMARY_ALREADY_OFFLINE(190004, "quality job summary already offline", "质量作业流程已经下线"),
    RUN_LINEAGE_PROCESS_DEFINITION_ERROR(190005, "run lineage process definition error", "运行映射流程失败"),

    /**
     * hudi
     */
    QUERY_HUDI_TABLE_INFO_ERROR(190005, "query failed", "查询hudi table 信息失败"),
    HUDI_TASK_FILL_DATA_ERROR(190010, "hudi task fill data error", "任务补数据失败"),
    QUERY_HUDI_TASK_INSTANTS_INFO_ERROR(190011, "query error", "查询任务信息失败"),
    QUERY_HUDI_TABLE_COMMITS_ERROR(190011, "query error", "查询Hudi表commit信息失败"),

    QUERY_KAFKA_LIST_INFO_ERROR(190005, "query failed", "查询kafka list 信息失败"),
    CREATE_TABLE_INFO_ERROR(190005, "create table failed", "创建表信息失败"),
    CREATE_TABLE__ERROR(190006, "create table: %s failed", "创建表: %s 失败"),

    LIST_SAME_LINEAGE__ERROR(190001, "list same lineage strategy error", "获取同源同目标表提取任务失败"),

    QUERY_TASK_STATUS_ERROR(190005, "create table failed", "获取任务状态失败"),

    /**
     * 远程服务调用
     */
    FEIGN_ERROR(500, "remote service fal", "调用服务失败"),


    PROCESS_DEFINITION_UPDATE_SUCCESS(0, "process definition update success", "流程保存成功"),
    WORKSPACE_NOT_SUITABLE(50027, "there is not any tenant suitable, please choose a tenant available.", "没有合适的工作空间，请选择可用的工作空间"),
    CURRENT_PROCESS_HAS_AN_RUNNING_INSTANCE(50030, "current process has an running instance", "当前流程存在正在运行的实例，请稍后再试"),
    WORKSPACE_NOT_EXIST(10017, "workspace not exists", "工作空间不存在"),
    UDF_IN_USE(20017, "UDF function in use", "UDF函数在使用，不能被删除"),
    HDFS_OPERATION_EMPTY(10007, "hdfs operation empty", "空间hdfs信息未配置"),
    PROJECT_DELETE_SUCCESS(0, "project delete success", "项目删除成功"),
    DELETE_RESOURCE_SUCCESS(0, "delete resource success", "删除资源文件成功"),
    CREATE_RESORCE_SUCCESS(0, "create resource success", "创建资源文件成功"),
    UPDATE_RESOURCE_SUCCESS(0, "update resource success", "更新资源文件成功"),
    VERIFY_RESOURCE_NAME_SUCCESS(0, "verify resource name success", "校验资源文件名称成功"),
    ONLINE_CREATE_RESUORCE_SUCCESS(0, "online create  resource success", "在线资源文件上传成功"),
    RESOURCE_FILE_NOT_EXIST_SIMPLE(20016, "resource file {0}  not exists", "资源文件[{0}]不存在"),
    CATALOG_NOT_EXIST_SIMPLE(20018, "catalog file not exists", "缺失类目！请完善目标表"),

    EMPTY_PROCESS_INIT(200001, "empty process %s init", "空流程[%s]初始化"),

    QUERY_DATA_TABLE_LIST_PAGING_ERROR(20001, " query_data_table_list_paging_error", "分页查询数据地图_表信息列表错误"),
    QUERY_CATALOG_LIST_PAGING_ERROR(20002, " query_catalog_list_paging_error", "查询类目信息列表错误"),
    DELETETABLE_CATALOG(20010, "delete table catalog", "删除目录错误"),
    UPDATETABLE_CATALOG(20012, "update table catalog", "编辑目录错误"),
    ATLAS_NOT_FOUND(20013, "atlas not found", "Atlas地址未配置"),
    UPDATE_STANDARD_MAPPING_PROBE(20014, "update standard mapping probe", "更新数据错误"),
    SAVE_SOURCE_DATA(20015, "save source data", "新增数据错误"),
    IMPORT_ETADATA_EXECL(30002, "import fail", "导入数据错误"),
    IMPORT_EMPTY(30001, "import empty data", "无导入数据"),
    QUERY_FAIL(11111, "query_fail", "查询失败"),
    SAVE_FAIL(11112, "save_fail", "组件保存失败"),
    TABLE_SAVE_FAIL(30008, "table save fail", "表保存失败"),
    TABLE_DELETE_FAIL(30009, "table delete fail", "表删除失败"),
    COLUMN_SAVE_FAIL(30010, "column save fail", "字段保存失败"),
    COLUMN_DELETE_FAIL(30011, "column delete fail", "字段删除失败"),
    TABLE_VALID_FAIL(30012, "table valid fail", "表生效失败"),
    TABLE_INVALID_FAIL(30013, "table invalid fail", "表失效失败"),
    TABLE_REGISTER_FAIL(30014, "table register fail", "表注册失败"),
    TABLE_UNREGISTER_FAIL(30015, "table unregister fail", "表注销失败"),
    TABLE_ENABLE_FAIL(30016, "table enable fail", "表启用失败"),
    TABLE_DISABLE_FAIL(30017, "table disable fail", "表停用失败"),
    DELETE_COLLECT_FAIL(30018, "cancel collect fail", "表取消收藏失败"),
    ADD_COLLECT_FAIL(30019, "add collect fail", "表收藏失败"),
    TABLE_MOVE_FAIL(30020, "table move fail", "表移入失败"),
    TABLE_SYNC_FAIL(30021, "table sync fail", "表更新失败"),
    TABLE_START_APPLY_FAIL(30022, "table start apply fail", "表启用申请失败"),
    TABLE_STOP_APPLY_FAIL(30023, "table stop apply fail", "表停用申请失败"),
    TABLE_CANCEL_APPLY_FAIL(30024, "table cancel apply fail", "表注销申请失败"),
    TABLE_REGISTER_APPLY_FAIL(30025, "table register apply fail", "表注册申请失败"),
    TABLE_TIMING_SYNC_FAIL(30026, "table timing sync fail", "表定时更新失败"),
    DATA_RELATION_SAVE_FAIL(30027, "data relation save fail", "数据血缘保存失败"),
    TABLE_BY_FIRST_CATALOG_ID_QUERY_FAIL(30028, "table by first catalog id query fail", "数据组织一级分类下的表查询失败"),
    RECOMMEND_TABLE_COUNT_QUERY_FAIL(30029, "recommand table count query fail", "推荐表总数查询失败"),
    QUERY_LINEAGE_STRATEGY_FAIL(30030, "blood relation query fail", "血源关系查询失败"),
    IMPORT_FILE_FORMAT_ERROR(30031, "import file_format_error", "导入文件格式错误"),
    QUERY_DICT_REFERENCE_DETAILS_FAIL(30032, "query dict reference details fail", "字典引用详情获取失败"),
    FIRST_CATALOG_LIST_QUERY_FAIL(30033, "first catalog list query fail", "一级类目获取失败"),
    LINEAGE_IMPORT_FAIL(30034, "lineage import fail", "血缘导入失败"),
    QUALITY_JOB_SUMMARY_SAVE_FAIL(30035, "quality summary save fail", "数据质量作业保存失败"),
    QUALITY_JOB_SUMMARY_UPDATE_FAIL(30035, "quality summary update fail", "数据质量作业更新失败"),
    QUERY_REFERENCE_STANDARD_PAGE_FAIL(30036, "query reference standard page fail", "引用标准获取失败"),
    QUERY_REFERENCE_STANDARD_DETAIL_FAIL(30037, "query reference standard detail fail", "引用标准详情获取失败"),
    TABLE_QUERY_FAIL(300038, "table query fail", "表查询失败"),
    HUDI_TABLE_VALID_FAIL(30039, "hudi table valid fail", "生效失败，数据库中表未初始化。HUDI类型表需相关数据同步任务执行成功后完成表初始化"),
    MOVE_CATALOG_SUCCESS(0, "update  catalog success", "移入类目成功"),
    DELETE_SUCCESS(0, "delete success", "删除成功"),
    DELETE_COLLECT_SUCCESS(0, "cancel  collect success", "表取消收藏成功"),
    ADD_COLLECT_SUCCESS(0, "cancel  collect success", "表收藏成功"),
    TABLE_START_APPLY_SUCCESS(0, "table start apply success", "表启用申请成功"),
    TABLE_STOP_APPLY_SUCCESS(0, "table stop apply success", "表停用申请成功"),
    TABLE_CANCEL_APPLY_SUCCESS(0, "table cancel apply success", "表注销申请成功"),
    TABLE_REGISTER_APPLY_SUCCESS(0, "table register apply success", "表注册申请成功"),
    TABLE_APPLY_EXIST(0, "table apply exist", "申请已存在，请在审批申请-我的申请中查看审批结果"),
    QUERY_SUCCESS(0, "query success", "查询成功"),
    MODIFY_SUCCESS(0, "modify success", "修改成功"),
    INSERT_SUCCESS(0, "insert success", "新增成功"),
    IMPORT_SUCCESS(0, "import success", "导入成功"),
    EXPORT_SUCCESS(0, "export success", "导出成功"),
    FILELD_MODIFY_SUCCESS(0, "field modify success", "字段修改成功"),
    TABLE_SAVE_SUCCESS(0, "table save success", "表保存成功"),
    TABLE_DELETE_SUCCESS(0, "table delete success", "表删除成功"),
    COLUMN_SAVE_SUCCESS(0, "column save success", "字段保存成功"),
    COLUMN_DELETE_SUCCESS(0, "column delete success", "字段删除成功"),
    TABLE_VALID_SUCCESS(0, "table valid success", "表生效成功"),
    TABLE_INVALID_SUCCESS(0, "table invalid success", "表失效成功"),
    TABLE_REGISTER_SUCCESS(0, "table register success", "表注册成功"),
    TABLE_UNREGISTER_SUCCESS(0, "table unregister success", "表注销成功"),
    TABLE_ENABLE_SUCCESS(0, "table enable success", "表启用成功"),
    TABLE_DISABLE_SUCCESS(0, "table disable success", "表停用成功"),
    DICT_SAVE_SUCCESS(0, "dict save success", "字典保存成功"),
    TABLE_MOVE_SUCCESS(0, "table move success", "表移入成功"),
    TABLE_SYNC_SUCCESS(0, "table sync success", "表更新成功"),
    TABLE_TIMING_SYNC_SUCCESS(0, "table timing sync success", "表定时更新成功"),
    DATA_RELATION_SAVE_SUCCESS(0, "data relation save success", "数据血缘保存成功"),
    QUALITY_JOB_SUMMARY_SAVE_SUCCESS(0, "quality summary save success", "数据质量作业保存成功"),
    QUALITY_JOB_SUMMARY_UPDATE_SUCCESS(0, "quality summary update success", "数据质量作业更新成功"),

    TABLE_RULE_CONFIG_UPDATE_SUCCESS(0, "table rule config update success", "按表配置规则更新成功"),

    TABLE_RULE_CONFIG_SAVE_SUCCESS(0, "table rule config save success", "按表配置规则创建成功"),

    RELATION_SAVE_SUCCESS(0, "relation update success", "保存成功"),
    LINEAGE_IMPORT_SUCCESS(0, "lineage import success", "血缘导入成功"),

    APP_SYSTEM_NAME_EXIST(30007, "app_system name exists", "来源应用系统已存在"),
    TABLE_EN_NAME_EXIST(30007, "table en name exists", "数据集英文名已存在"),
    TABLE_CN_NAME_EXIST(30006, "table cn name exists", "数据集中文名已存在"),
    TABLE_NAME_EXIST(30004, "table name exists", "数据集编码已存在"),
    COLUMN_EN_NAME_EXIST(300014, "column en name exists", "数据项英文名已存在"),
    COLUMN_CN_NAME_EXIST(300015, "column cn name exists", "数据项中文名已存在"),
    SJXBSF_EXIST(30005, "sjxbsf exists", "数据项标识符已存在"),
    LINEAGE_EXIST(300027, "The blood relationship between the tables already exists. Please rebuild it! The repeated LinageName is [{0}]! The repeated field is [{1}]", "已存在该表间该类血缘关系，请重新构建！重复血源为[{0}]!重复字段为[{1}]"),

    QUERY_ERROR(0, "query fail", "查询失败"),
    MODIFY_ERROR(10000, "modify fail", "修改失败"),
    DELETE_ERROR(10001, "delete  fail", "删除失败"),
    IMPORT_ERROR(10002, "import fail", "导入失败"),
    UDF_IMPORT_ERROR(10002, "import fail", "udf函数不存在"),
    UDF_GROUP_IMPORT_ERROR(10002, "import fail", "策略组不存在"),
    EXPORT_ERROR(10002, "export fail", "导出失败"),
    ADD_ERROR(10002, "add fail", "新增失败"),


    ADD_TEMRECORD_ERROR(1, "nbbsf is exist", "内部标识符已存在！"),
    ADD_TEMRECORD_FAIL(1, "add  fail", "添加失败！"),
    ADD_ZEMC_FAIL(1, "add  fail", "科信标准元素中文名已存在！"),
    UPDATE_TEMRECORD_FAIL(1, "update fail", "修改失败！"),

    // 数据资源权限
    RESOURCE_AUTH_QUERY_ERROR(31000, "resource auth query error", "查询资源权限失败！"),
    RESOURCE_AUTH_USER_EMPTY_ERROR(31001, "resource auth userId empty ", "资源权限用户不能为空！"),
    RESOURCE_AUTH_USER_ALREADY_EXISTS(31002, "resource auth user already exists ", "用户资源权限配置已存在！"),
    RESOURCE_AUTH_SAVE_ERROR(31003, "resource auth save error", "新增资源权限失败！"),
    RESOURCE_AUTH_UPDATE_ERROR(31004, "resource auth update error", "修改资源权限失败！"),
    RESOURCE_AUTH_DELETE_ERROR(31005, "resource auth delete error", "删除资源权限失败！"),
    SAVE_KAFKA_SCHEMA_ERROR(31006, "save kafka schema error", "保存KafkaSchema失败"),
    //数据质量
    RULE_TEMPLATE_NOT_EXIST(32000, "rule template not found", "规则模版不存在"),
    QUERY_OBJECTIVITY_MONITOR_DATA_FAIL(32001, "query objectivity monitor data fail", "对象化监测数据获取失败"),
    QUERY_INPUT_DATA_INFORMATION(32002, "query input data information", "接入检测数据获取失败"),
    REPEAT_TABLE(10000, "table already exists system quality job", "表已存在系统数据质量作业"),


    //数据质量规则模版
    RULE_TEMPLATE_ALREADY_EXISTS(32003, "tule template rule name already exists", "规则模版名称已存在"),

    //标签
    TAG_SAVE_SUCCESS(33000, "tag save success", "标签保存成功"),
    TAG_SAVE_ERROR(33001, "tag save error", "标签保存失败"),
    TAG_CATALOG_ERROR(33002, "tag catalog list error", "标签目录查询失败"),
    TAG_CATALOG_SAVE_ERROR(33003, "tag catalog save error", "标签保存失败"),
    TAG_CATALOG_DELETE_ERROR(33004, "tag catalog delete error", "标签不允许删除"),
    TAG_CATALOG_QUERY_ERROR(33005, "tag catalog query error", "标签不存在"),
    TAG_CATALOG_UPDATE_ERROR(33006, "tag catalog update error", "标签修改失败"),
    TAG_PROPERTIES_ERROR(33007, "tag properties page error", "获取列表失败"),
    TAG_PROPERTIES_VALUE_ERROR(33008, "tag properties value save error", "标签属性保存失败"),
    TAG_PROPERTIES_DELETE_ERROR(33009, "tag properties delete error", "删除标签属性失败"),
    TAG_PROPERTIES_QUERY_ERROR(33010, "tag properties query error", "查询标签属性详情失败"),
    TAG_PROPERTIES_UPDATE_ERROR(33011, "tag properties update error", "更新标签属性失败"),
    TAG_AND_PROPERTIES_LIST_ERROR(33012, "tag and properties list error", "标签和属性查询失败"),
    TAG_VALUE_OR_TIER_ERROR(33013, "tag value or tier error", "标签属性值查询失败"),
    TAG_PROPERTIES_TABLE_ERROR(33014, "table list error", "获取表列表失败"),
    TAG_COLUMN_LIST_ERROR(33015, "column list error", "获取字段列表失败"),
    TAG_SAVE_REPEAT_ERROR(33016, "tag save repeat error", "标签目录已存在"),
    TABLE_IS_NOT_EXIST(33017, "table is not exist", "目标数据集编码不存在"),
    TAG_LIST_CREATE_METHOD_ERROR(33018, "list create method error", "创建方式不存在"),
    TAG_DETAIL_ERROR(33019, "tag detail error", "标签详情查询失败"),
    TAG_LIST_PARENT_ERROR(33020, "tag list parent error", "标签分类查询失败"),
    TAG_EXIST_ERROR(33021, "tag exist error", "标签已存在"),
    TAG_CATALOG_HAVE_CHILD_ERROR(33022, "tag catalog have child error", "该分类下含有标签，不允许被删除!"),
    TAG_SWITCH_VERSION_ERROR(33023, "tag switch version error", "切换版本失败"),
    TAG_PROCESS_ERROR(33023, "get tag processId error", "切换版本失败"),
    TAG_VERSION_ACTIVE_ERROR(33024, "tag version active error", "已经是当前版本，不可切换"),
    TAG_JOB_PAGE_ERROR(33025, "tag job page error", "标签列表查询失败"),
    TAG_NUMBER_OF_PEOPLE(33026, "tag find number of people error", "人数分布查询失败"),
    TAG_PROPERTIES_GLOBAL_ERROR(33027, "user properties global error", "用户属性已绑定表"),
    TAG_HISTORY_DETAIL_ERROR(33028, "tag history detail error", "标签历史详情查询失败"),
    TAG_SAVE_BATCH_ERROR(33029, "tag save batch error", "标签批量保存失败"),
    TAG_STORAGE_RULE_ERROR(33030, "tag storage rule error", "标签储存规则配置失败"),
    TAG_META_EVENT_UPDATE_ERROR(33031, "tag meta event update error", "元事件更新失败"),
    TAG_SUBJECT_DEIT_ERROR(33032, "tag subject edit error", "标签主体属性修改失败"),
    TAG_SUBJECT_PAGE_ERROR(33033, "tag subject page error", "标签主体属性分页失败"),
    TAG_SUBJECT_LIST_ERROR(33034, "tag subjet list error", "标签主体属性列表查询失败"),
    TAG_SUBJECT_REMOVE_ERROR(33035, "tag subject remove error", "标签主体属性删除失败"),
    TAG_SUBJECT_DETAIL_ERROR(33036, "tag subject detail error", "标签主体属性详情查询失败"),
    TAG_RELEASE_ERROR(33037, "Deactivation is not allowed while the tag is running", "标签作业正在运行中，不可停用，请稍后再试！！！"),
    //xueliang
    XUE_LIAG_REGISTER_ERROR(34000, "xue liang register error", "注册失败"),
    XUE_LIANG_KEEP_ALIVE_ERROR(34001, "xue liang keep alive error", "保活失败"),
    XUE_LIANG_LOGOUT_ERROR(34002, "xue liang logout error", "注销失败"),

    // 数据脱敏
    IDENTIFICATION_RULE_ALREADY_EXISTS(35001, "data identification rule name already exists", "识别规则名称已存在"),
    IDENTIFICATION_TIMES_EMPTY(35002, "data identification items empty", "识别项全部为空，请选择一个识别项"),
    IDENTIFICATION_REG_EXP_ERROR(35003, "data identification reg exp error", "识别项正则表达式错误"),
    IDENTIFICATION_ALREADY_IN_USE(35004, "data identification already in use", "识别规则已被使用"),
    DESENSITIZATION_POLICY_ALREADY_EXISTS(35005, "desensitization policy name already exists", "脱敏策略名称已存在"),
    DESENSITIZATION_POLICY_RULE_EMPTY(35006, "desensitization policy rule empty", "脱敏规则不能为空"),


    TABLE_IS_INVALID(40001, "table is invalid", "来源表[name: {0} type: HUDI]未生效，请先生效。"),

    //数据对账
    ACCOUNT_CHECK_QUERY_FAIL(36001, "account check query fail", "对账单查询失败"),
    ACCOUNT_CHECK_DETAIL_QUERY_FAIL(36002, "account check detail query fail", "对账单详情查询失败"),
    ACCOUNT_CHECK_COUNT_QUERY_FAIL(36003, "account check count query fail", "对账单统计查询失败"),
    ACCOUNT_CHECK_ACTION_FAIL(36004, "account check action fail", "对账单操作失败"),
    ACCOUNT_CHECK_CONFIG_SAVE_FAIL(36005, "account check config save fail", "对账配置保存失败"),
    ACCOUNT_CHECK_CONFIG_QUERY_FAIL(36006, "account check config query fail", "对账配置查询失败"),
    DATA_REPORT_FAIL(36007, "data reporting  fail", "数据上报失败"),
    DATA_REPORT_UPDATE_FAIL(36008, "data reporting update fail", "数据上报流程更新失败"),
    DATA_REPORT_QUERY_FAIL(36009, "data reporting query fail", "数据上报数据量获取失败"),
    CK_DATA_REPORT_QUERY_FAIL(36010, "ck query fail", "获取ck策略失败"),
    REPORT_ERROR(36011, "report  fail", "上报失败"),
    GET_REPORT_ERROR(36012, "get report fail", "获取上报结果失败"),
    PROVIDER_ACCOUNT_CHECK_DETAIL_QUERY_FAIL(36013, "provider account check detail query fail", "提供方对账单详情查询失败"),

    //删除HUDI数据
    DEL_HUDI_DATA_ERROR(37000, "delete hudi data error", "删除hudi数据失败"),
    NOT_HUDI_TABLE(37001, "table not hudi table", "不是hudi表"),
    SQL_IS_EMPTY(37002, "sql is empty", "sql不能为空"),
    INIT_SQL_ERROR(37003, "innit sql error", "初始化sql失败"),

    //数据元标准
    DATA_ELEMENT_STANDARD_SAVE_SUCCESS(0, "data element standard save success", "数据元标准保存成功"),
    DATA_ELEMENT_STANDARD_QUERY_FAIL(38000, "data element standard query fail", "数据元标准查询失败"),
    DATA_ELEMENT_STANDARD_DETAIL_QUERY_FAIL(38001, "data element standard detail query fail", "数据元标准详情查询失败"),
    DATA_ELEMENT_STANDARD_SAVE_FAIL(38002, "data element standard save fail", "数据元标准保存失败"),
    DATA_ELEMENT_STANDARD_DELETE_FAIL(38003, "data element standard delete fail", "数据元标准删除失败"),
    DATA_ELEMENT_STANDARD_EXISTS(38004, "data element standard exists", "该数据元标准已存在"),
    DATA_ELEMENT_STANDARD_ACTION_FAIL(38005, "data element standard action fail", "数据元标准操作失败"),

    //数据分级分类
    DATA_CLASSIFICATION_SAVE_ERROR(39000, "save data classification error", "数据分类添加失败"),
    DATA_CLASSIFICATION_LIST_ERROR(39001, "list data classification error", "查询数据分类列表失败"),
    DATA_CLASSIFICATION_EDIT_ERROR(39002, "edit data classification error", "修改数据分类失败"),
    DATA_CLASSIFICATION_DELETE_ERROR(39003, "delete data classification error", "删除数据分类失败"),
    DATA_CLASSIFICATION_EDIT_TABLE_ERROR(39004, "edit table classification error", "修改表分类失败"),
    DATA_CLASSIFICATION_EDIT_COLUMN_ERROR(39005, "edit column classification error", "修改字段分类失败"),
    DATA_DICT_SUMMARY_BIND_ERROR(39006, "bind the dictionary table Failed", "绑定字典失败"),
    DATA_CLASSIFICATION_DICT_LIST_ERROR(39007, "list classification and dict error", "查询分级分类和字典失败"),
    INIT_DATA_CLASSIFICATION_PERMISSION_ERROR(39008, "init data classification permission error", "查询数据分级分类页面失败"),

    INIT_ERROR(10001, "init error", "初始化失败"),
    //初始化资源模板
    INIT_CLASSIFICATION_ERROR(40000, "init classification error", "初始化分级分类失败"),
    CONVERT_SJZZ_ERROR(400001, "convert sjzzid to code error", "转换数据组织失败"),

    //标准管理-字典映射
    DICT_TABLE_MAPPING_SAVE_FAIL(50000, "dict table mapping save fail", "字典映射保存失败"),
    DICT_TABLE_MAPPING_PAGE_QUERY_FAIL(50001, "dict table mapping page query fail", "字典映射分页查询失败"),
    DICT_TABLE_MAPPING_DELETE_FAIL(50002, "dict table mapping delete fail", "字典映射删除失败"),
    DICT_TABLE_MAPPING_DETAIL_QUERY_FAIL(50003, "dict table mapping detail query fail", "字典映射详情查询失败"),
    DICT_TABLE_MAPPING_ITEMS_PAGE_QUERY_FAIL(50004, "dict table mapping items page query fail", "字典映射项分页查询失败"),
    DICT_TABLE_MAPPING_QUERY_FAIL(50005, "dict table mapping query fail", "字典映射查询失败"),
    DICT_TABLE_MAPPING_ITEMS_SAVE_FAIL(50006, "dict table mapping items save fail", "字典映射项保存失败"),
    DICT_TABLE_MAPPING_ITEMS_DELETE_FAIL(50007, "dict table mapping items delete fail", "字典映射项删除失败"),
    DICT_DETAIL_QUERY_ERROR(50008, "get dict details error", "获取字典详情失败"),
    CODE_SET_IMPORT_ERROR(50009, "import codeSet error", "导入字符集失败"),
    CODE_SET_EXPORT_ERROR(50010, "export codeSet error", "导出字符集失败"),
    CODE_SET_SAVE_ERROR(50010, "save codeSet error", "创建字符集失败"),
    CODE_SET_EDIT_ERROR(50011, "edit codeSet error", "修改字符集失败"),
    CODE_SET_DELETE_ERROR(50012, "delete codeSet error", "删除字符集失败"),




    //数据源监控
    DATA_SOURCE_MONITOR_START_ERROR(51000, "data source monitor start error" ,"数据源监控失败"),
    DATA_SOURCE_MONITOR_OVERVIEW_ERROR(51002, "data source monitor overview error" ,"数据源概览查询失败"),
    DATA_SERVICE_MONITOR_OVERVIEW_ERROR(51002, "data source monitor overview error" ,"数据服务概览查询失败"),
    DATA_SOURCE_MONITOR_EDIT_ERROR(51001, "data source monitor edit error" ,"数据源监控定时配置失败"),
    MONITOR_LOG_EX_ERROR(51003, "monitor log ex list error" ,"监控日志查询失败"),
    MONITOR_LOG_EX_PAGE_ERROR(51004, "monitor log ex page error" ,"监控日志分页查询失败"),

    // 告警定义
    ALERT_DEFINE_BIND_PROCESS_DEFINE_EMPTY_ERROR(52000,"process define ids is empty","流程定义IDs不能为空"),

    //字典
    DICT_EXIST(300028, "dict exists", "代码code数据已存在"),

    //系统日志 auth
    OPT_LOG_DELETE_ERROR(300029,"optLog delete error","系统日志删除失败"),
    OPT_LOG_CLEAR_ERROR(300030,"opt log clear error","系统日志清空失败"),
    MENU_QUERY_ERROR(300031,"menu query error","菜单查询失败"),
    MENU_PATH_QUERY_ERROR(300031,"menu path query error","菜单路径查询失败"),
    MENU_INSERT_ERROR(300032,"menu insert error","菜单新增失败"),
    MENU_REMOVE_ERROE(300033,"menu del error","菜单删除失败"),


    //数据集成
    QUERY_TABLE_RULE_ERROR(52000, "query table rule error", "查询表规则失败");


    private final int code;
    private final String enMsg;
    private final String zhMsg;

    private Status(int code, String enMsg, String zhMsg) {
        this.code = code;
        this.enMsg = enMsg;
        this.zhMsg = zhMsg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(LocaleContextHolder.getLocale().getLanguage())) {
            return this.zhMsg;
        } else {
            return this.enMsg;
        }
    }
}
